import App from './App'
import { myRequest } from './util/api.js'

// 引入colorui组件
import cuCustom from 'colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)


Vue.prototype.$myRequest = myRequest
Vue.filter('formatDate',(date)=>{
	const nDate = new Date(date)
	const year = nDate.getFullYear().toString().padStart(2,0)
	const month = nDate.getMonth().toString().padStart(2,0)
	const day = nDate.getDay()
	return year + '-' + month + '-' + day
})

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif